<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Hello World</title>
    <script>
        function displayDate(){
            document.getElementById("demo").innerText=Date();
        }
    </script>
</head>
<body>

<h1>Hello World</h1>
<p id="demo">显示日期的第一个程序</p>
<button type="button" onclick="displayDate()">显示日期</button>
</body>
</html>